/*
 
 */
package com.jme3.gde.gui.extra.xam.model.impl;

import com.jme3.gde.gui.extra.xam.model.NiftyAttribute;
import com.jme3.gde.gui.extra.xam.model.ElementTypeImpl;
import org.w3c.dom.Element;
import com.jme3.gde.gui.extra.xam.model.ElementType;
import com.jme3.gde.gui.extra.xam.model.ImageType;
import com.jme3.gde.gui.extra.xam.model.NiftyModel;
import com.jme3.gde.gui.extra.xam.model.NiftyQName;
import com.jme3.gde.gui.extra.xam.model.SubImageSizeModeType;
import com.jme3.gde.gui.extra.xam.model.visitor.NiftyComponentVisitor;	

/**
 * Implementation for domain component imageType.
 * 
 * @author cuongnguyen
 */
// Generated by XAM AutoGen Tool v0.2
public class ImageTypeImpl extends ElementTypeImpl implements ImageType {

    public ImageTypeImpl(NiftyModel model, Element element) {
        super(model, element);
    }
    
    public ImageTypeImpl(NiftyModel model) {
        this(model, createElementNS(model, NiftyQName.IMAGETYPE));
    }

    // attributes

    public String getFilename() {
        return getAttribute(NiftyAttribute.FILENAME);
    }

    public void setFilename(String filename) {
        setAttribute(FILENAME_PROPERTY, NiftyAttribute.FILENAME, filename);
    }

    public String getX() {
        return getAttribute(NiftyAttribute.X);
    }

    public void setX(String x) {
        setAttribute(X_PROPERTY, NiftyAttribute.X, x);
    }

    public String getY() {
        return getAttribute(NiftyAttribute.Y);
    }

    public void setY(String y) {
        setAttribute(Y_PROPERTY, NiftyAttribute.Y, y);
    }

    public boolean isFilter() {
        return Boolean.parseBoolean(getAttribute(NiftyAttribute.FILTER));
    }

    public void setFilter(boolean filter) {
        setAttribute(FILTER_PROPERTY, NiftyAttribute.FILTER, filter);
    }

    public String getImageMode() {
        return getAttribute(NiftyAttribute.IMAGEMODE);
    }

    public void setImageMode(String imageMode) {
        setAttribute(IMAGEMODE_PROPERTY, NiftyAttribute.IMAGEMODE, imageMode);
    }

    public SubImageSizeModeType getSubImageSizeMode() {
        return SubImageSizeModeType.getSubImageSizeModeType(getAttribute(NiftyAttribute.SUBIMAGESIZEMODE));
    }

    public void setSubImageSizeMode(SubImageSizeModeType subImageSizeMode) {
        setAttribute(SUBIMAGESIZEMODE_PROPERTY, NiftyAttribute.SUBIMAGESIZEMODE, subImageSizeMode.getValue());
    }

    public String getResizeHint() {
        return getAttribute(NiftyAttribute.RESIZEHINT);
    }

    public void setResizeHint(String resizeHint) {
        setAttribute(RESIZEHINT_PROPERTY, NiftyAttribute.RESIZEHINT, resizeHint);
    }

    // child elements

    public void accept(NiftyComponentVisitor visitor) {
        visitor.visit(this);
    }

}